home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tcl70b2.lha / tcl7.0b2 / doc / read.n < prev    next >
Text File  |  1993-05-10  |  2KB  |  51 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/read.n,v 1.1 93/05/10 17:10:20 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS read tcl
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. read \- Read from a file
  29. .SH SYNOPSIS
  30. \fBread \fR?\fB\-nonewline\fR? \fIfileId\fR
  31. .br
  32. \fBread \fIfileId numBytes\fR
  33. .BE
  34.  
  35. .SH DESCRIPTION
  36. .PP
  37. In the first form, all of the remaining bytes are read from the file
  38. given by \fIfileId\fR; they are returned as the result of the command.
  39. If the \fB\-nonewline\fR switch is specified then the last
  40. character of the file is discarded if it is a newline.
  41. In the second form, the extra argument specifies how many bytes to read;
  42. exactly this many bytes will be read and returned, unless there are fewer than
  43. \fInumBytes\fR bytes left in the file; in this case, all the remaining
  44. bytes are returned.
  45. \fIFileId\fR must be \fBstdin\fR or the return
  46. value from a previous call to \fBopen\fR; it must
  47. refer to a file that was opened for reading.
  48.  
  49. .SH KEYWORDS
  50. file, read
  51.